const requset = require("../service/requset");

/**
 *[getGroupInfo 获取一个仓库的文档列表]
 *
 * @return  {[type]}             [return description]
 */
function getdocs(namespaceOrId) {
  return requset({
    method: "get",
    url: `/repos/${namespaceOrId}/docs`
  });
}
/**
 * [getGroupInfo 获取某个组织的详细信息]
 *
 * @return  {[type]}             [return description]
 */
function getDocsDetails(namespaceOrId, slug, raw) {
  return requset({
    method: "get",
    url: `/repos/${namespaceOrId}/docs/${slug}`,
    params: {
      raw
    }
  });
}

module.exports = {
  getdocs,
  getDocsDetails
}